﻿Public Class Form23
    Dim bd As BindingSource
    Dim ad As Object
    Dim dt As DataTable
    Dim ds As DataSet
    Dim udd As IUltraDropDown
    Public Sub New(ByVal dt As DataTable, ad As Object, bd As BindingSource, ByVal ds As DataSet, ByVal udd As IUltraDropDown)

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Me.bd = bd
        Me.ad = ad
        Me.dt = dt
        Me.ds = ds
        Me.udd = udd
    End Sub
    Private Sub Form23_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Me.ad.fill(dt)
        Me.IUltraGrid1.DataSource = bd
        Me.udd.DataSource = bd
        Me.IUltraGrid1.DisplayLayout.Bands(0).Columns(0).ValueList = udd
        Me.IUltraGrid1.DisplayLayout.Bands(0).Columns(0).Header.Caption = "mã"
        Me.IUltraGrid1.DisplayLayout.Bands(0).Columns(1).Header.Caption = "tên"
        Me.IUltraGrid1.setDoiTuongXuLyDuLieu(Me.dt, Me.bd, Me.ad, Me.ds)
        Me.IUltraGrid1.setChoPhepMenuStrip()
        Me.IUltraGrid1.setThemIUltraDropDown(udd, Me.dt)

    End Sub
End Class